package club.pchome.service;

import club.pchome.common.util.PageUtil;
import club.pchome.dao.TFeedbackDao;
import club.pchome.dao.TOrderDao;
import club.pchome.model.TFeedback;
import club.pchome.model.TOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class TFeedBackService extends BaseService{


    @Autowired
    TFeedbackDao tFeedbackDao;

    public PageUtil<TFeedback> feedBackList(PageUtil<TFeedback> pu, Map<String, Object> map) {
        pu.pageUtilHandle(tFeedbackDao.feedBackCount());
        map.put("startRow", pu.getStartRow());
        map.put("pageSize", pu.getPageSize());
        pu.setDataList(tFeedbackDao.feedBackList(map));
        return pu;
    }

    public long updateTFeedbackIndex(TFeedback tFeedback){
        return tFeedbackDao.updateTFeedbackIndex(tFeedback);
    }
}
